package com.shop.shoporder.service.Auto.Impl;

import com.shop.shoporder.entity.order.Order;
import com.shop.shoporder.mapper.order.RealPayMapper;
import com.shop.shoporder.service.Auto.RealPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("RealPayService")
public class RealPayServiceImpl implements RealPayService {

    @Autowired
    RealPayMapper realPayMapper;

    @Override
    public int setRealPay() {
        realPayMapper.setRealPay1();
        List<Order> orderList = realPayMapper.getRealPayOrder();
        if (orderList != null) {
            for (int i = 0; i < orderList.size(); i++) {
                setRealPay2(orderList.get(i));
            }
        }
        return 0;
    }

    public int setRealPay2(Order order) {
        return 0;
    }
}
